#!/bin/bash

# 宝塔定时任务添加，每天分钟 执行：sudo -uwww /www/wwwroot/api/shell/dev/1min.sh

# 日志目录，没有就创建
dirname=/www/wwwlogs/api/`date +'%Y-%m'`
if [ ! -d $dirname ]; then
    mkdir -p $dirname
fi

filename=${dirname}/`date +'%d'`-1min

# 话费下单到供应商: 乐充
# php /www/wwwroot/api/think mobile:createSupplierOrder --supplierCode lechong >> ${filename}-createSupplierOrder-lechong.log 2>&1 &

# 话费下单到供应商: 椰子
# php /www/wwwroot/api/think mobile:createSupplierOrder --supplierCode xyzshops >> ${filename}-createSupplierOrder-xyzshops.log 2>&1 &

# 话费下单到供应商: 万图拍
# php /www/wwwroot/api/think mobile:createSupplierOrder --supplierCode nianyu >> ${filename}-createSupplierOrder-nianyu.log 2>&1 &

# 话费下单到供应商: 36鲸
 php /www/wwwroot/api/think mobile:createSupplierOrder --supplierCode duojing36 >> ${filename}-createSupplierOrder-duojing36.log 2>&1 &

# 话费下单到供应商: 36鲸新
 php /www/wwwroot/api/think mobile:createSupplierOrder --supplierCode jing36 >> ${filename}-createSupplierOrder-jing36.log 2>&1 &

# 话费充值订单轮询
php /www/wwwroot/api/think mobile:reOrder >> ${filename}-mobile-reOrder.log 2>&1 &

# 话费状态变更回调通知代理商
php /www/wwwroot/api/think mobile:notifyAgent >> ${filename}-mobile-notifyAgent.log 2>&1 &

# 话费充值失败退款
php /www/wwwroot/api/think mobile:autoRefund >> ${filename}-mobile-autoRefund.log 2>&1 &



wait
